#!/usr/bin/perl -w

$_="yabba dabba doo";
if(/abba/){
	print "It matched!\n"
}
if(/(.)\1/){
	print "It matched same character next to itself!\n";
}
if(/y(....) d\1/){
	print "It matched the same after y and d!\n";
}
if(/y(.)(.)\2\1/){
	print "It matched the same after y and d!\n";
}
if(/y((.)(.)\3\2) d\1/){
	print "It matched!\n";
}

$_="aa11bb";
if(/(.)\g{1}11/){
	print "It matched!\n";
}
if(/(.)\g{-1}11/){
	print "It matched!\n";
}
if(/(.)(.)\g{-1}11/){
	print "It matched!\n";
}